package game.players.cpu.opponent;

import com.uqbar.vainilla.DeltaState;

import game.players.SoccerPlayer;
import game.players.states.CPUOppWithBall;

public abstract class WithBallAbstractMovingCPUOpp extends CPUOppWithBall {
	
	private double x;
	private double y;

	public WithBallAbstractMovingCPUOpp(SoccerPlayer player, double x, double y) {
		super(player);
		this.setX(x);
		this.setY(y);
	}

	@Override
	public void loseTheBall() {
		this.getPlayer().setState(new BeatenCPUOppPlayer(this.getPlayer(), this.isRight()));
	}
	
	@Override
	public void update(DeltaState deltaState) {
		this.getSoccerBall().moveNormally(this.getX(), this.getY());
		super.update(deltaState);
	}
	
	
	
	
	
	

	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}

}
